package dynamic_demo;

/**
 * 使用CGLib实现多重代理
 *
 * @Author: Crystal
 * @Date: 2018/12/10 11:40
 **/
public class Point2 implements Chain.Point {

    public Object proceed(Chain chain) {
        System.out.println("point 2 before");
        try {
            Thread.sleep(20);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Object result = chain.proceed();
        try {
            Thread.sleep(20);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("point 2 after");
        return result;
    }
}
